package com.zkq.graduate.enums;

import lombok.Getter;

/**
 * *
  * @Author zhangkaiqiang
  * @Description TODO
  * @Date 14:00 2019/9/24
  **/
@Getter
public enum ResponseEnum {

    // 没有访问权限
    UNAUTHORIZED(403, "没有访问权限！"),

    // 登陆失败
    LOGIN_FAILURE(402, "登陆失败！"),

    // 未知错误
    UNKNOWN_ERROR(500, "未知错误!"),

    // 插入数据失败
    INSERT_ERROR(501, "插入数据失败！"),

    // 删除数据失败
    DELETE_ERROR(502, "删除数据失败！"),

    // 修改数据失败
    UPDATE_ERROR(503, "修改数据失败！"),

    // 查询数据失败
    SELECT_ERROR(504, "查询数据失败！"),

    // 文件上传失败
    UPLOAD_FAILURE(505, "文件上传失败！"),

    // 未输入或选择必填项
    MISSING_PARAMETER(506, "必填（选）项不能为空！"),

    PARAM_BANK(507, "数据为空"),

    PHONE_NOT_EXIST(508,"电话号码为空"),

    USER_NOT_EXIST(509,"用户名不存在"),

    PASSWORD_ERROR(510,"密码错误"),

    CAPTCHA_EXPIRE(511,"验证码过期"),

    CAPTCHA_DATE_NOT_ENOUGH(512,"60秒内只能发送一条短信，请稍后重试"),

    CAPTCHA_ERROR(513,"验证码错误"),

    ALREADY_SELECT_TITLE(514,"已经选择题目,不能重复选择"),

    TITLE_UPPER_LIMIT(515,"该题目可选人数已达上限"),

    NOT_UPDATE(516,"该文件已存在，请勿重复上传"),

    NOT_BETWEEN_LIMIT_TIME(517,"当前时间不在允许的时间范围内");

    private Integer code;

    private String msg;

    ResponseEnum(int code, String msg){
        this.code = code;
        this.msg = msg;
    }
}
